#!/bin/sh

awk '
FILENAME==ARGV[1]{
    print "1"$0;
}
FILENAME==ARGV[2]{
    print "2"$0;
}
FILENAME==ARGV[3]{
    print "3"$0
}' file1 file2 file3 
